<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
include_once("../../config.inc.php");

session_start();
$_LangPath = "realbet3d";
$strTemplatePath = __Admintemplate_Path."/RealBet3D/";
$arrPower = CheckUsePower("realbet3d");
if($arrPower === false)ErrMsgOutputHTML("Error", "", 1);


if(empty($_SESSION["Admin_Info"] -> GameType))$_SESSION["Admin_Info"] -> GameType = 1;
if($_data["ChangeGameType"] == "Yes"){
	$_SESSION["Admin_Info"] -> GameType = $_data["GameType"];
}
$_data["GameType"] = $_SESSION["Admin_Info"] -> GameType;

$intLottoID = (int)$_data["LottoID"];
if(empty($intLottoID))$intLottoID = 2;

$data = $_data["data"];
switch($_data["op"]){
	case "GetOdds":				//抓取賠率
		include_once(__Language_Path."/lang_member/thesame_1.lang.php");
		include_once(__Admin_Path."/logincheck_admin_listdata.php");
		include_once(__Modules_Path."/Gamble.lib.php");
		include_once(__Common_Path."/gambletype/GambleType".$_data["GameType"]."_".$intLottoID.".inc.php");
		include_once("GetOdds.php");
		break;

	default:								//顯示操盤表
		include_once(__Common_Path."/Lotto.inc.php");
		include_once(__Modules_Path."/Gamble.lib.php");
		$arrLotto = $_arrLotto[$intLottoID];
		include_once(__Modules_Path."/RealBet.lib.php");
		include_once(__Language_Path."/selectlanguage_admin.php");
		include_once(__Common_Path."/SysParam.inc.php");
		include_once(__Modules_Path."/ChangeTime.lib.php");
		include_once(__Admin_Path."/logincheck_admin_listdata.php");
		include_once(__Modules_Path."/Lotto.lib.php");
		@include_once(__Common_Path."/todaygame/Gamble".$intLottoID.".inc.php");
		//取得警示設定資料
		$OverBetSQL = "SELECT * FROM `bet_AlertOverBet` WHERE `bA_MemID` = '". $_SESSION["Admin_Info"]->ID ."'";
		$RS = PMA_mysql_query($OverBetSQL, $$_Conn);
		if ($RS) {
			$PsObj = PMA_mysql_fetch_object($RS);
		}

		@mysql_free_result($RS);
		include_once("List.php");
		break;
}
@mysql_close($$_Conn);
?>